import request from '@/router/axios';

export const getProduct = (current, size, params) => {
    return request({
        url: '/api/product/findAll',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}
export const remove = (ids) => {
    return request({
        url: '/api/product/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}

export const add = (row) => {
    return request({
        url: '/api/product/add',
        method: 'post',
        data: row
    })
}

export const update = (row) => {
    return request({
        url: '/api/product/update',
        method: 'post',
        data: row
    })
}

// export const getCategory = (type) => {
//     return request({
//         url: '/api/getCategory',
//         method: 'post',
//         params: {
//             type,
//         }
//     })
// }